import { searchApi } from '@/api/search/search-api'

interface QueryDataParams {
    fetchName: keyof typeof searchApi
    fetchParams?: any
}
export async function queryData(params: QueryDataParams) {
    const { fetchName, fetchParams } = params
    const res = await searchApi[fetchName](fetchParams)
    return res
}